import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { ZoneService, Zone } from './zone.service';

@Injectable({
	providedIn: 'root',
})
export class ListService implements Resolve<Zone[]> {
	constructor(private zoneService: ZoneService) {}

	async resolve(route: ActivatedRouteSnapshot) {
		// return this.zoneService.tree();
		return this.zoneService.batch_areas();
	}
}
